﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Threading;
using System.Windows.Media.Imaging;

using System.IO.IsolatedStorage;
using System.IO;
using System.Windows.Media.Effects;


using System.Windows.Ink;

namespace GameEngine
{
    public class EffectHelper
    {

        public static WriteableBitmap ApplyEffect(WriteableBitmap source, Effect effect)
        {
            Image image = new Image();
            image.Effect = effect;

            WriteableBitmap temp = new WriteableBitmap(source.PixelWidth, source.PixelHeight);
            image.Source = source;

            temp.Render(image, null);
            temp.Invalidate();

            return temp;
        }
    }
}
